package com.digitalchina.trade.controller;

import com.digitalchina.trade.entity.TbAccount;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;


import javax.servlet.http.HttpSession;

@Controller
public class BalanceController {
//    @Autowired
//    private AccountMapper accountMapper;


    @RequestMapping("/bal")
    public String balanceSelect(HttpSession session , Model model){
        TbAccount tbAccount = (TbAccount) session.getAttribute("user");

        model.addAttribute("accountBalance",tbAccount.getAccount_balance());
        return "balance";
    }

}
